package com.dc.dbus.transport.rabbitmq;

import java.io.Serializable;

public class MsgBack implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public final long replyForMsgId;
	
	public final int replyForCmd;
	public final int resultCode;
	public final Object returnObj;
	
	public MsgBack(long replyForMsgId, int replyForCmd, int resultCode, Object returnObj) {
		super();
		this.replyForMsgId = replyForMsgId;
		this.replyForCmd = replyForCmd;
		this.resultCode = resultCode;
		this.returnObj = returnObj;
	}

	@SuppressWarnings("unchecked")
	public <T> T getParam() {
		return (T) returnObj;
	}
}
